package com.cowain.monitor.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cowain.monitor.entity.PmsClientEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  
 *  * @author 冬暖
 *  * @projectName pms-monitor
 *  * @title     PmsClientDao   
 *  * @package    com.cowain.monitor.dao  
 *  * @description    PMS客户信息       
 *  * @date   2020/7/28 18:07  
 *  * @version V1.0.0
 *  
 */
@Mapper
public interface PmsClientDao extends BaseMapper<PmsClientEntity> {
    /**
     * 查询该客户是否存在
     * @param clientNumber 客户编号
     * @return 客户表id
     */
    Long findClient(@Param("clientNumber") Long clientNumber);

    /**
     * 批量添加
     * @param infoList 客户集合
     */
    void insertList(List<PmsClientEntity> infoList);

    /**
     * 批量修改
     * @param infoEntityList 客户
     */
    void updateInfoList(List<PmsClientEntity> infoEntityList);

    /**
     * 获取客户信息
     * @param custId 客户id
     * @param custAddress 客户地址
     * @return 客户信息
     */
    Long findCustomer(@Param("custId") Long custId, @Param("custAddress") String custAddress);
}
